package de.tum.in.eist.poll.client;

import com.google.gwt.user.client.rpc.RemoteService;
import com.google.gwt.user.client.rpc.RemoteServiceRelativePath;

import de.tum.in.eist.poll.client.Exceptions.ArgumentIsNullException;
import de.tum.in.eist.poll.client.Exceptions.DatabaseFailureException;
import de.tum.in.eist.poll.client.Exceptions.InvalidCharacterInputException;
import de.tum.in.eist.poll.client.Model.*;

@RemoteServiceRelativePath("pollService")
public interface PollService extends RemoteService {
	
	public boolean checkCredentials(String user, String password) throws DatabaseFailureException;
	public Feedback[] getFeedbacks(Lecture l) throws DatabaseFailureException, ArgumentIsNullException;
	public Rating[] getRatings(Lecture l) throws DatabaseFailureException, InvalidCharacterInputException, ArgumentIsNullException;
	public Lecture[] getLectures() throws DatabaseFailureException, ArgumentIsNullException;
	public boolean pushFeedbackForLecture(Lecture l, Feedback f) throws DatabaseFailureException, ArgumentIsNullException, InvalidCharacterInputException;
	public void addLecture(Lecture l) throws DatabaseFailureException, ArgumentIsNullException, InvalidCharacterInputException;
	public void deleteLecture(Lecture l) throws DatabaseFailureException, ArgumentIsNullException, InvalidCharacterInputException;
	public void openLecture(Lecture l) throws DatabaseFailureException, ArgumentIsNullException, InvalidCharacterInputException;
	public void closeLecture(Lecture l) throws DatabaseFailureException, ArgumentIsNullException, InvalidCharacterInputException;
	public int getUpdate();
}
